package com.yjh.auth.common.exception;

import org.springframework.validation.ObjectError;

import java.util.List;

/**
 * <p>
 * 请求数据验证异常
 * </p>
 *
 * @author huanggx
 */
public class RequestBodyValidException extends RuntimeException {

	private final List<ObjectError> errors;
	private final String message;

	public RequestBodyValidException(String message, List<ObjectError> errors) {
		this.errors = errors;
		this.message = message;
	}

	public List<ObjectError> getErrors() {
		return this.errors;
	}

	@Override
	public String getMessage() {
		return this.message;
	}
}
